#ifndef GPS_H
#define GPS_H

#include "main.h"

#define UBX_MSG_CLASS_CFG           0X06
#define UBX_MSG_ID__CFG_TP5         0X31

#define GPS_UART USART1

#define GPS_PWR_EN GPIO_PIN_12  	/*PB12*/
#define GPS_RST_PIN GPIO_PIN_13 	/*PB13*/
#define GPS_1PPS_PIN GPIO_PIN_2 	/*PD2*/
#define GPS_SYNC_PIN GPIO_PIN_12	/*PC12*/

#define ARRAYNUM(arr_name)     (uint32_t)(sizeof(arr_name) / sizeof(*(arr_name)))
#define USART1_DATA_ADDRESS    ((uint32_t)&USART_DATA(USART1))

struct tm get_gps_time(void);
int gps_init(void);
#endif
